<!-- 已派车 -->
<template>
  <div class="container">
    <div>
      <el-button type="primary" @click="getData">编辑</el-button>
      <el-button type="primary">拆单</el-button>
      <el-button type="primary">取消派车</el-button>
      <el-button type="primary">费用调整</el-button>
      <span>已选中（{{ checkCount }}）条</span>
    </div>

    <div class="list">
      <div v-for="(item, index) in normalList" :key="index" class="item">
        <el-checkbox v-model="item.check" size="large" />
        <img src="/src/assets/logo.png">
        <div class="flex-c">
          <p>SH-00220121-7782</p>
          <p>已派车</p>
        </div>
        <div class="flex-c">
          <div class="flex-r">
            <p>司机信息：</p>
            <p>苟安伟1（京B63D58）</p>
          </div>
          <div class="flex-r">
            <p>货物信息：</p>
            <p>花瓶（12件 / 34公斤 / 10方）</p>
          </div>
        </div>
        <div class="flex-c">
          <div class="flex-r">
            <p>司机信息：</p>
            <p>苟安伟1（京B63D58）</p>
          </div>
          <div class="flex-r">
            <p>货物信息：</p>
            <p>花瓶（12件 / 34公斤 / 10方）</p>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup lang='ts'>
import { onMounted } from 'vue'
import useHomeRequest from '@/composables/home/useHomeRequest'
const { getNormalListApi, normalList, checkCount } = useHomeRequest()
const props = defineProps({
  reptsModel: {
    type: Object,
    required: true
  }
})
const getData = () => {
  getNormalListApi(props.reptsModel)
}
</script>
<style lang='scss' scoped>
.list {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: scroll;

  & > .item {
    display: flex;
    padding: 10px;
    border-bottom: 1px solid #ececec;
    & > img {
      width: 30px;
      height: 30px;
      margin-left: 10px;
      margin-right: 10px;
      align-self: center;
    }
  }
}
</style>